package com.wiscamp.ninechapters.panels.application.assemblers;


import com.wiscamp.ninechapters.panels.application.command.CreateGroupCommand;
import com.wiscamp.ninechapters.panels.application.command.UpdateGroupCommand;
import com.wiscamp.ninechapters.panels.application.vo.GroupVO;
import com.wiscamp.ninechapters.panels.domain.entities.Group;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
        nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS,
        imports = {AssemblyLoader.class})
public interface GroupAssembler {
    GroupAssembler Instance = Mappers.getMapper(GroupAssembler.class);

    GroupVO toGroupVO(Group entity);

    Group fromCreateCommand(CreateGroupCommand createCommand);

    Group fromUpdateCommand(UpdateGroupCommand updateCommand);

}
